describe("MoveSummaryController unit test", function(){

    var moveSummaryController = null;

    beforeEach(function(){


        var t_alertCtrl = App.AlertController.create();
        var t_loadingCtrl = App.LoadingController.create();
        var t_moveHolderCtrl = App.MoveHolderController.create();
        App.MoveSummaryController.reopen({

            init:function(){
                this.set('controllers.alert', t_alertCtrl);
                this.set('controllers.loading', t_loadingCtrl);
                this.set('controllers.moveHolder', t_moveHolderCtrl);
            }
        });

        moveSummaryController = App.MoveSummaryController.create();
        moveSummaryController.summaryListViewData = Ember.Object.create({
            displayList: []
        });
    });
    describe("controller unit test", function(){


        it("prepareController unit test", function(){

            var transfer = App.OwnAccountTransfer.create();
            spyOn(App.getSession(), 'getCurrentTransfer').andReturn(transfer);
            spyOn(moveSummaryController, 'set');
            moveSummaryController.prepareController();

            expect(App.getSession().getCurrentTransfer).toHaveBeenCalled();
            expect(moveSummaryController.set).toHaveBeenCalledWith('transfer', transfer);
        });

        it("makeAnotherTransferAction", function(){
            spyOn(moveSummaryController, 'transitionTo');
            moveSummaryController.makeAnotherTransferAction();
            expect(moveSummaryController.transitionTo).toHaveBeenCalled();
        })

        it("seeTransactionHistoryAction", function(){
        	spyOn(moveSummaryController, 'transitionTo');
        	moveSummaryController.seeTransactionHistoryAction();
        	expect(moveSummaryController.transitionTo).toHaveBeenCalled();
        });
    })
})